package com.xiaoyu.lanling.feature.chat.model.message

import com.xiaoyu.im.datamodel.AppMessage
import com.xiaoyu.lanling.feature.chat.viewholder.ChatViewHolderManager

class ChatMessageReceiveAudioItem(message: AppMessage) : ChatMessageReceiveBaseItem(message) {

    val duration: Int = message.payload.duration
    val audioFilePath: String = message.payload.localPathOrUrlForMedia
    val newTip: Boolean = message.hasNewTip()
    var mAutoPlay = false
    val rewardInfo = RewardInfo(attrs.optJson("rewardInfo"))

    override val childrenViewType: Int
        get() = ChatViewHolderManager.TYPE_RECEIVE_AUDIO
}